var btnFlag = true

$('#edit-btn-1').on('click', function(){
    if(btnFlag){
        $('#staticUsername')
        .removeAttr('readonly')
        .removeClass('form-control-plaintext')
        .addClass('form-control')    
        btnFlag = false   
    }else{
        $('#staticUsername')
        .attr('readonly','readonly')
        .removeClass('form-control')
        .addClass('form-control-plaintext')    
        btnFlag = true
    }
})

$('#edit-btn-2').on('click', function(){
    if(btnFlag){
        $('#inputEmail')
        .removeAttr('readonly')
        .removeClass('form-control-plaintext')
        .addClass('form-control')    
        btnFlag = false   
    }else{
        $('#inputEmail')
        .attr('readonly','readonly')
        .removeClass('form-control')
        .addClass('form-control-plaintext')    
        btnFlag = true
    }
})